<template>
  <div id="app">
    <p>-----------App:</p>
    <h2>{{$store.state.counter}}</h2>
    <button @click="add">+</button>
    <button @click="sub">-</button>
    <p>-----------Hellovuex:</p>
    <hellovuex/>
  </div>
</template>

<script>
import Hellovuex from './components/Hellovuex.vue'

export default {
  name: 'App',
  components: {
    Hellovuex
  },
  methods: {
    add() {
      this.$store.commit("increment")
    },
    sub() {
      this.$store.commit("decrement")
    }
  }
}
</script>

<style>
</style>
